public class TwoDimensionalArray01{
	public static void main(String[] args) {
		int[][] num={
			{4,6},
			{1,4,5,7},
			{-2}
		};
		int sum = 0;
		for (int i = 0; i < num.length; i++) {
			for (int j = 0; j < num[i].length; j++) {
				sum += num[i][j];
			}
		}
		System.out.println(sum);
	}
}